/*
 * @Description: 承租户合同接口
 */
import xjaxios from "@/utils/request";

export default {
  getTenantInfoList(params) {
    return xjaxios.post("v3/lessee/contract/queryPageByCondition", {
      page: params.page,
      size: params.size,
      entity: params.entity
    })
  },
  getQueryImgList(list) {
    return xjaxios.get(`v3/lessee/contractPicture/query?contractPictureId=${list}`)
  },
  getTenantList(no) {
    return xjaxios.get(`v3/lessee/contract/queryByNo?no=${no}`)
  },
  getfacilityList(params) {
    return xjaxios.post(`v3/facility/facility/queryByCondition`, { facilityStatus: 0 })
  },
  // 添加合同信息
  addTenant(params) {
    return xjaxios.post('v3/lessee/contract/add', params)
  },
  // 添加合同图片
  addTenantImg(params) {
    return xjaxios.post('v3/lessee/contractPicture/add', params)
  },
  // 单个删除合同
  delTenant(no) {
    return xjaxios.get(`v3/lessee/contract/delByNo?no=${no}`)
  },
  // 批量删除合同
  delListTenant(noList) {
    return xjaxios.post('v3/lessee/contract/delListByNo', {
      noList: noList
    })
  },
  // 单个删除合同图片
  delTenantImg(no) {
    return xjaxios.get(`v3/lessee/contract/delByNo?no=${no}`)
  },
  // 批量删除合同图片
  delListTenantImg(noList) {
    return xjaxios.post('v3/lessee/contractPicture/delList', {
      contractPictureIdList: noList
    })
  },
  // 修改合同
  editTenant(params) {
    return xjaxios.post('v3/lessee/contract/edit', params)
  },
  // 修改合同
  editTenantImg(params) {
    return xjaxios.post('v3/lessee/contractPicture/edit', { ...params })
  }
}
